3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
Often, you're not interested in all the objects in a model that are visible from the current placement of a camera. Some objects may be too far away from the camera location to create a useful image when projected onto the two-dimensional view plane, and some objects may be so close to the camera that they obscure other important objects. QuickDraw 3D, like most 3D graphics systems, provides a mechanism for ignoring objects that lie outside your current range of interest. You do this by defining two clipping planes that delimit the part of a model that is rendered. The hither plane is a plane perpendicular to the viewing direction that indicates the clipping range closest to the camera. Any objects or parts of objects that lie between the camera and the hither plane do not appear in a rendered image. Similarly, the yon plane is a plane perpendicular to the viewing direction that indicates the clipping range farthest from the camera. Any objects or parts of objects that lie beyond the yon plane do not appear in a rendered image. In short, only objects or parts of objects that lie between the hither and yon planes appear in a rendered image, as shown in Figure 4 .
Figure 4 The hither and yon planes
The hither and yon planes are sometimes called the near and far planes, respectively.
The extent between the hither and yon planes of a camera is the camera range, defined by the TQ3CameraRange data structure.
typedef struct TQ3CameraRange {
float hither;
float yon;
} TQ3CameraRange;
The clipping planes are specified by distances along the viewing direction from the camera location. The distance to the yon plane should always be greater than the distance to the hither plane, and the distance to the hither plane should always be greater than 0.0.
Previous | QD3D Book | Overview | Chapter Contents | Next |